Page({
    data:{
        title:"怪咖",
        time:"2023-06-16",
        singer:"薛之谦",
        url:"http://p1.music.126.net/TOkRGd59o3hAOKsnMMmMMA==/109951163755246383.jpg?param=177y177",
        list:[
            {
                id:553543014,
                videoSrc:"http://link.hhtjim.com/163/553543014.mp3",
                songname:"摩天大楼",
                name:"薛之谦",
            },
            {
                id:574921549,
                videoSrc:"http://link.hhtjim.com/163/574921549.mp3",
                songname:"怪咖",
                name:"薛之谦",
            },
            {
                id:557581967,
                videoSrc:"http://link.hhtjim.com/163/557581967.mp3",
                songname:"肆无忌惮",
                name:"薛之谦",
            },
            {
                id:525241230,
                videoSrc:"http://link.hhtjim.com/163/525241230.mp3",
                songname:"狐狸",
                name:"薛之谦",
            },
            {
                id:1334647784,
                videoSrc:"http://link.hhtjim.com/163/1334647784.mp3",
                songname:"天份",
                name:"薛之谦",
            },
            {
                id:1294910785,
                videoSrc:"http://link.hhtjim.com/163/1294910785.mp3",
                songname:"最好",
                name:"薛之谦",
            },
            {
                id:1336088717,
                videoSrc:"http://link.hhtjim.com/163/1336088717.mp3",
                songname:"醒来 (Live)",
                name:"薛之谦 / 岳云鹏",
            },
            {
                id:557583281,
                videoSrc:"http://link.hhtjim.com/163/557583281.mp3",
                songname:"哑巴",
                name:"薛之谦",
            },
            {
                id:571340283,
                videoSrc:"http://link.hhtjim.com/163/571340283.mp3",
                songname:"那是你离开了北京的生活",
                name:"薛之谦",
            },
            {
                id:1307334195,
                videoSrc:"http://link.hhtjim.com/163/1307334195.mp3",
                songname:"违背的青春",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})